const seriesRegExp = /^cq\-setting\-\-s\d+n\d+$/;

class SettingClass {
	el = null; // 元素
	series = []; // 组件系列名
	constructor(params) {}
}

const Setting = {
	setup: false, // 是否已开启默认设置
	create(params) {
		return new SettingClass(params);
	},
	setupDefault() {
		this.setup = true;
		const showElBtns = document.querySelectorAll('.cq-contral--show_setting');
		const hideElBtn = document.querySelectorAll('.cq-contral--hide_setting');
		if (showElBtns) {
			for (let i = 0; i < showElBtns.length; i++) {
				const btn = showElBtns[i];
				btn.addEventListener('click', function () {
					document.querySelector('#cq-setting').classList.add('show');
				});
			}
		}
		if (hideElBtn) {
			for (let i = 0; i < hideElBtn.length; i++) {
				const btn = hideElBtn[i];
				btn.addEventListener('click', function () {
					document.querySelector('#cq-setting').classList.remove('show');
				});
			}
		}
	},
};

export default Setting;
